▪️ Fibre Type –> Main
Effect
▪️ Food Type –> Main
Effect
▪️ Fibre/Food combination –> The
Interaction Effect
The interaction effect tells us whether the effect of Fibre depends on Food Type (and vice versa).
bioaccess.anova<-aov(Bioaccessibility~Fibre*Food, data=bioaccess)
If the interactions effect is significant we can do
multiple comparison tests.
For example:
TukeyHSD(biaccess.anova)
▪️ The two factors in the two-way ANOVA design are
known as factorial:
▪️ We have every combination of every level of each
factor.
▪️ If the levels of one of the factors appear in only one level of the other factors we have nested factors
▪ We conduct an experiment to test the soil pH in
Agricultural vs Industrial land.
▪ We have the factor Treatment with 2 levels
(Agricultural and Industrial).
▪ We have 4 areas nested within each treatment and 5 soil samples in each area.
▪ The previous design is nested because an area
cannot belong to both the Agricultural and the Industrial
group.
## Df Sum Sq Mean Sq F value Pr(>F)
## Treatment 1 5.417 5.417 6.831 0.0143 *
## Treatment:Area 5 5.702 1.140 1.438 0.2416
## Residuals 28 22.204 0.793
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
p>0.05 for the nested factor –> the pH variance within areas in the same group is small.
1. The population from which samples are drawn should
be normally distributed.
2. Homogeneity of variance: Homogeneity
means that the variance among the groups should be approximately
equal.
3. Independence of cases: the sample cases should be
independent of each other.
▪️ A study design with repeated measures data has
multiple dependent variable observations collected at several time
points.
▪️ This design violates the samples independence
assumption.
▪️ For time course experiments we can use a
repeated measures ANOVA.
▪️ A repeated measures ANOVA accounts for the correlation within and between experimental groups along with the time of the measurements (time point 1, time point 2, …).